package com.liangzi.service_core.pojo.vo;

import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

/**
 * @author zhj
 * @Title:
 * @Package
 * @Description:
 * @date 2021/12/25下午3:05
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class VisitBookingVO {

    public static final String PHONE_REG = "^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\\d{8}$";
    public static final String NAME_REG = "^[\\u4e00-\\u9fa5]{2,4}$";



    @ApiModelProperty(value = "预约时间")
    @NotNull(message = "预约时间 cannot be null")
    private String bookingDate;

    @ApiModelProperty(value = "预约人姓名")
    @NotNull(message = "预约人姓名 cannot be null")
    @Pattern(regexp = NAME_REG,message = "姓名不合法")
    private String  bookingName;

    @ApiModelProperty(value = "预约人联系方式")
    @Pattern(regexp = PHONE_REG,message = "手机号不合法")
    private String bookingPhone;
}
